<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function foo(a=0,b=1){ //形参
            console.log(a,b);
            // 形参默认值：当没有传递对应的实参时，使用形参默认值，如果传递实参，使用传递过来的实参
        }
        foo(); //实参
    </script>
</body>
</html>